<div class='row-fluid'>
    <div class='span6'>
        <h3>Próximo check-in</h3>
        <form class="well">
            <div>
                <label>Nombre</label>
                <input type="text" class="span12" value='<?php echo '[' . $view->nextPoint['pointCode'] . '] ' . $view->nextPoint['pointName']; ?>'/>
                <label>Dirección</label>
                <textarea class="span12">

                </textarea>
                <div class='row-fluid'>
                    <div class="span6">
                        <label>Programación</label>
                        <input type="text" class="input-medium" value='<?php echo $view->nextPoint['route_date_format']; ?>'/>
                    </div>
                </div>
                <a href='<?php echo $view->url(array('controller'=>'Dashboard', 'action' => 'point'));?>' class="btn btn-mini btn-primary pull-right startRoute">
                    <i class="icon-check icon-white"></i>
                    Check-in
                </a>
            </div>
        </form>
    </div>
    <!--    <div id="clock" class="light span6" style='float: right;'>
            <div class="display">
                <div class="weekdays"></div>
                <div class="ampm"></div>
                <div class="alarm"></div>
                <div class="digits"></div>
            </div>
        </div>-->
</div>
<div class='row-fluid'>
    <h3>Puntos de recolección/entrega</h3>
    <table class="table table-striped table-bordered table-condensed" id='routePoints'>
        <thead>
            <tr>
                <th>#</th>
                <th>Nombre</th>
                <th>Programación</th>
                <th>Check-in</th>
                <th>Acción</th>
            </tr>
        </thead>
        <tbody>
            <?php
            foreach ($view->points as $key => $package) :
                ?>
                <tr <?php echo $package['check_in'] === true ? 'class="info"' : ''; ?> >
                    <td><?php echo $key + 1; ?></td>
                    <td class="text-left"><?php echo '[' . $package['pointCode'] . '] ' . $package['pointName']; ?></td>
                    <td class="text-right"><?php echo $package['route_date_format']; ?></td>
                    <td><?php echo $package['shipping_date_format']; ?></td>
                    <td class="text-center">
                        <?php if ($package['check_in'] === true): ?>
                            <a href='<?php echo $view->url(array('controller'=>'Dashboard', 'action' => 'point'));?>' class="btn btn-mini btn-primary pull-right startRoute">
                                <i class="icon-check icon-white"></i>
                                Check-in
                            </a>
                        <?php endif; ?>
                        <?php if ($package['check_in'] === null): ?>
                            <button type="button" class="btn btn-mini btn-success pull-right startRoute" title="Punto visitado">
                                <i class="icon-ok icon-white"></i>
                            </button>
                        <?php endif; ?>
                    </td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
</div>
<style type="text/css">
    table#routePoints td.text-right
    {
        text-align: right;
    }
    table#routePoints td.text-center
    {
        text-align: center;
    }
</style>
